{template "header-huiyuan.html"}
<!--主页-->
{template "fanhui-index.html"}
<!--尾部导航-->
<div class="container navbar-fixed-top d-beijing-hei-f3">
	<div class="d-shang-10 ">
		<div class="col-md-6 col-md-offset-3   d-beijing-baise d-yuanjiao-10">

			
		</div>
	</div>
</div>

<div class="d-container">
	<div class="d-row">
		<div class="col-md-6 col-md-offset-3  d-yuanjiao-20">
			<div class="row">
				<div class="d-yuanjiao-10 d-kuan d-bianhua-20 ">
					<div id="content_list">
						{template "dianzan-list.html"}
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
{count action=module module=duixin yidu=0 shouxinren=$member.id catid=4 return=dianzan}

{if $dianzan_count > 0} 
<div class="pinglun">
	<div class="d-kuan d-neikuang-30 d-dibu d-beijing-baise ">
		<div class="row">
			<!--导航-->
			<div class="col-xs-12 d-gao-60">
				<div class="d-wenzi-juzhong d-wenzi-12 d-shang-10  d-jiacu activea jiacu " id="readMore">
					<i class="fa fa-comment-o d-wenzi-20"></i><br>
					<span>一键阅读 ({$dianzan_count})</span>
				</div>
			</div>
			
		</div>
	</div>
</div>
{/if}
<style>
	.d-tishis {
		width: 10px;
		height: 12px;
		margin-left: -17px;
		margin-top: -35px;
	}
	.d-beijing-hongse-2 {
		background-color: #f95705;
	}
</style>
<script type="text/javascript">
	// 点击已读
	$(".data_list").click(function(){
	    var id = $(this).data("id");
	    $.get("{dr_url_prefix('index.php')}?s=quan&c=son&m=yidu&id="+id, function(data){
	        //dr_cmf_tips(data.code, data.msg.value + data.msg.jifen);
	    }, 'json');
	});
	$(document).ready(function() {
	    $('#readMore').click(function() {  
	        d_pinglun();  
	    });  
	});
	//滚动显示更多
	var Mpage=1;
	var scroll_get = true;  //做个标志,不要反反复复的加载
	$(document).ready(function () {
	    $(window).scroll(function () {
	        if (scroll_get==true &&  (400 + $(window).scrollTop())>($(document).height() - $(window).height())) {
	            scroll_get = false;
	            /*layer.msg('内容加截中,请稍候',{time:1000});*/
	            dr_ajax_load_more();
	        }
	    });
	});
	function dr_ajax_load_more(){
	    Mpage++;
	    $.get('{SITE_URL}index.php?s=api&c=api&m=template&app=member&lanmu=duixin&name=dianzan-list.html&format=json&page='+Mpage+'&'+Math.random(),function(res){
	        $('.footer-cont').hide();
	        if(res.code==1){
	            if (res.msg.indexOf("</div>") != -1) {
	                $('#content_list').append(res.msg);
	                scroll_get = true;
	            } else {
	                layer.msg("已经显示完了",{time:500});
	            }
	        }else{
	            /*layer.msg(res.msg,{time:2500});*/
	        }
	    }, 'json');
	}
	function d_pinglun(){
	    Mpage++;
	    $.get('{SITE_URL}index.php?s=member&app=duixin&c=home&m=yijiandianzan&uid={$member.id}',function(res){
	        console.log('000',res.code);
	        if(res.code==1){
	            $('.pinglun').hide();
				$('.badge').hide();
				layer.msg("一键已读",{time:500});
	        }else{
	            //$('.footer-cont').hide();
				//layer.msg("已经显示完了",{time:500});
	        }
	    }, 'json');
	}
</script>


{template "fanhui.html"}
{template "mfooter.html"}